Mac F2C is not ready to go out of the box. You must first build all of the required supporting libraries and install supporting files where your compiler can find them.
If you have MacOS System 7.5 (or any version with a scriptable Finder),
the installer script application included with Mac F2C will do all of this for you. Simply double click on the Mac F2C Installer and answer the questions it asks you. The installer will not only build all of the libraries and install supporting files, it will also build the test programs for you, leaving them in the folder Test Project ニ. After the installer is finished, you should run these programs (by double-clicking on them) to verify the correct operation of Mac F2C.
The installer supports CodeWarrior IDE v2 (using the Metrowerks Standard Library), Symantec for PowerPC v8.0.4, and THINK (for 68K) v7.0.5.
If you want to set-up the F2C for MPW package, a series of make files are provided to do this. Please refer to the chapter 窶弑sing F2C for MPW窶 for detailed instructions on setting-up and using this package.
ツ
If you do not have a version of the MacOS with a scriptable Finder (or if you have earlier versions of THINK, Symantec, or CodeWarrior) then you must build all of the libraries and install supporting files manually. You should read the 窶彜et Up窶 section of the chapter dedicated to the compiler you plan to use (these chapters are titled 窶弑sing Mac F2C With窶ヲ窶). I also strongly recommend using the included test program to verify correct operation of Mac F2C and the support libraries. Again, detailed information on how to do this is provided in the chapter of this documentation dedicated to the compiler you plan to use, in the section titled 窶弖erifying Correct Operation of Mac F2C窶.
If you don窶冲 have MacOS System 7.5, click on your compiler窶冱 icon to go to the corresponding instructions for setting up Mac F2C manually窶ヲ
ツ ツ ツ
Translating with Mac F2C
You can use Mac F2C to translate FORTRAN to C by any of four methods:
窶「 Start up Mac F2C and select the Translate command from the File menu.
窶「 Drag-&-drop a bunch of FORTRAN files onto Mac F2C.
窶「 Write an AppleScript to drive Mac F2C. Mac F2C is scriptable and conforms to the AppleEvents Object Model.
ツ
窶「 If you are using Mac F2C with CodeWarrior, you can also use the CodeWarrior MPW/ToolServer tools to drive integrated Mac F2C - CodeWarrior builds.
FORTRAN files must be TEXT files and must end in .f or .F (sorry, but the ending is determined by the unix f2c kernel窶琶t rejects files handed to it with any other endings). The output file is the same name with a .c extension if you selected C code for the output, or the same name with a .cp extension if you selected C++ code for the output.
The Options menu items and dialogs are generally self-explanatory. If you don窶冲 understand what an option means, or don窶冲 understand why an option is dimmed, check the balloon help. If you check the Make these the new defaults box before clicking the OK button, your option selections will be saved in a preference file and used again the next time you start Mac F2C.
Using Code Generated by Mac F2C
After the translation, create a new project using one of the Mac F2C project models/stationary provided for your compiler. Add the C files generated by Mac F2C to this project. Bring everything up-to-date and you are ready to go. If you use MPW, just copy and modify one of the included makefiles.